void re_order(int x[], int n)
{
    for (int i = 0; i < n / 2; i++)
    {
        int tmp = x[i];
        x[i] = x[n - 1 - i];
        x[n - 1 - i] = tmp;
    }
}